import React, { Component } from 'react'

export default class Child extends Component {

state = {
    // users:[
    //     {id:'001',name:'张三',age:18},
    //     {id:'002',name:'李四',age:28},
    //     {id:'003',name:'王五',age:38},
    //     ]
}


  render() {
    return (
      <div>
        <h2>我是Child</h2>
        {
            this.state.users.map(obj => <h4 key={obj.id}>{obj.name}---{obj.age}</h4>)
        }
      </div>
    )
  }
}
